home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Die Speccy' 97
/
Die Speccy' 97.iso
/
amiga_system
/
the_aminet
/
util
/
rexx
/
tritonrexx376.lha
/
TritonRexx
/
Programme
/
Break.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1995-09-17
|
4KB
|
161 lines
/*
$VER: Break.rexx Demo (13.9.95) Copyright in 1995 by Nils Goers
This small Script is a Demo to inspirate you ;) I'm to lazy to
create a better GUI. This GUI is quite enough for me, for you too ??
*/
OutFile = "t:Statusliste"
Status = "Status full"
Break = "Break"
FALSE = 1
TRUE = 0
PARSE ARG PubScreen
_main:
IF PubScreen == "?" THEN DO
OPTIONS PROMPT "PUBSCREEN/K: "
PARSE PULL PubScreen
END
IF PubScreen == "" THEN
PubScreen = "Workbench"
IF ~SHOW('LIBRARIES','tritonrexx.library') THEN DO
IF ~ADDLIB('tritonrexx.library',10,-30,0) THEN DO
SAY 'Kann die <tritonrexx.library> nicht oeffnen!'
EXIT(10)
END
END
IF ~SHOW('LIBRARIES','rexxtricks.library') THEN DO
IF ~ADDLIB('rexxtricks.library',10,-30,0) THEN DO
SAY 'Kann die <rexxtricks.library> nicht oeffnen!'
EXIT(10)
END
END
call initListe
call initWindow
quitprogram = FALSE
_loop:
DO WHILE quitprogram = 1
CALL TR_WAIT(app,'')
DO WHILE TR_HANDLEMSG(app,'event')
IF event.trm_class = 'TRMS_NEWVALUE' THEN DO
IF event.trm_id = 1 THEN DO
nummer=TR_GETATTRIBUTE(window,1,TRAT_Value)+1
ShowName = DELWORD(liste.nummer,1,4)
IF ShowName = "" THEN ShowName = "Unnamed"
CALL TR_SETATTRIBUTE(window,80,'TRAT_Text',ShowName)
END
END
IF event.trm_class = 'TRMS_ACTION' THEN DO
IF event.trm_id = 2 THEN CALL BREAKC
IF event.trm_id = 3 THEN CALL BREAKD
IF event.trm_id = 4 THEN CALL BREAKE
IF event.trm_id = 5 THEN CALL BREAKF
IF event.trm_id = 6 THEN CALL BREAKALL
IF event.trm_id = 7 THEN DO
CALL initListe
CALL TR_SETATTRIBUTE(window,1,'TROB_Listview',Liste)
END
END
IF event.trm_class = 'TRMS_CLOSEWINDOW' THEN DO
nummer = TR_GETATTRIBUTE(window,10,'TRAT_Value')+1
quitprogram = TRUE
END
END
END
CALL TR_CLOSEPROJECT(window)
CALL TR_DELETEAPP(app)
EXIT
initWindow:
windowtags = WindowID(1),
PubScreenName(PubScreen),
WindowTitle('Break.rexx 1995 by Nils Goers'),
'HorizGroupA Space',
'VertGroupA Space',
Text3('P: Stack: gv: pri: Loaded as command:'),
ListSelCN('Liste',1,0),
ClippedTextBox("",80) 'Space',
'HorizGroupA',
Button('CTRL-C',2),
Button('CTRL-D',3),
Button('CTRL-E',4),
Button('CTRL-F',5),
Button('ALL',6),
GetEntryButton(7),
'EndGroup EndGroup Space EndGroup',
'EndProject'
app = TR_CREATEAPP('TRCA_Name Listview')
IF app ~= '00000000'x THEN DO
window = TR_OPENPROJECT(app,windowtags)
WindowProject=C2D(window) /* zum Locken des Fensters bei About */
IF window ~= '00000000'x THEN quitprogram = TRUE
END
RETURN
initListe:
ADDRESS COMMAND Status ">"OutFile
IF READFILE(Outfile,liste) == 0 THEN EXIT(5)
ADDRESS COMMAND "delete "Outfile "QUIET"
DO i = 1 to liste.0
liste.i= DELWORD(liste.i,1,1)
liste.i= DELWORD(liste.i,2,1)
liste.i= DELWORD(liste.i,3,1)
liste.i= DELWORD(liste.i,4,1)
liste.i= DELWORD(liste.i,5,3)
END
RETURN
BREAKC:
ToolType = "C"
CALL DoIt
RETURN
BREAKD:
ToolType = "D"
CALL DoIt
RETURN
BREAKE:
ToolType = "E"
CALL DoIt
RETURN
BREAKF:
ToolType = "F"
CALL DoIt
RETURN
BREAKALL:
ToolType = "ALL"
CALL DoIt
RETURN
DoIt:
ToolName = WORD(Liste.nummer,1); ToolName=COMPRESS(Toolname,":")
IF ToolName = "LISTE.NUMMER" THEN RETURN
ADDRESS COMMAND Break ToolName ToolType
ADDRESS COMMAND "wait"
CALL initListe
CALL TR_SETATTRIBUTE(window,1,'TROB_Listview',Liste)
CALL TR_SETATTRIBUTE(window,80,'TRAT_Text'," ")
RETURN
/*EOS*/